/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package com.fzhucc.modules.sciStudio.domain;

import com.fzhucc.base.BaseEntity;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
* @website https://eladmin.vip
* @description /
* @author yyg
* @date 2024-01-10
**/
@Entity
@Data
@Table(name="tb_sci_studio")
public class SciStudio extends BaseEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "`name`",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "工作室名称")
    private String name;

    @Column(name = "`model_id`")
    @ApiModelProperty(value = "劳模id")
    private Integer modelId;

    @Column(name = "`unit`")
    @ApiModelProperty(value = "申报单位")
    private String unit;

    @Column(name = "`sz_unit`")
    @ApiModelProperty(value = "所在单位")
    private String szUnit;

    @Column(name = "`num`")
    @ApiModelProperty(value = "当前成员人数")
    private Integer num;

    @Column(name = "`studio_create_year`")
    @ApiModelProperty(value = "工作室创建年份")
    private String studioCreateYear;

    @Column(name = "`type`")
    @ApiModelProperty(value = "工作室类型")
    private String type;

    @Column(name = "`main_work`")
    @ApiModelProperty(value = "主要从事工作")
    private String mainWork;

    @Column(name = "`contacts`")
    @ApiModelProperty(value = "申报联系人")
    private String contacts;

    @Column(name = "`contacts_way`")
    @ApiModelProperty(value = "申报联系人联系方式")
    private String contactsWay;

    @Column(name = "`leader_name`")
    @ApiModelProperty(value = "领衔人姓名")
    private String leaderName;

    @Column(name = "`leader_sex`")
    @ApiModelProperty(value = "领衔人性别")
    private String leaderSex;

    @Column(name = "`leader_birth`")
    @ApiModelProperty(value = "领衔人出生年月")
    private String leaderBirth;

    @Column(name = "`leader_post_unit`")
    @ApiModelProperty(value = "领衔人单位及职务")
    private String leaderPostUnit;

    @Column(name = "`leader_honor`")
    @ApiModelProperty(value = "领衔人最高荣誉")
    private String leaderHonor;

    @Column(name = "`leader_award_year`")
    @ApiModelProperty(value = "领衔人获奖年份")
    private String leaderAwardYear;

    @Column(name = "`details`")
    @ApiModelProperty(value = "简介")
    private String details;

    @Column(name = "`bnd_year_expenses`")
    @ApiModelProperty(value = "本年度经费预算")
    private String bndYearExpenses;

    @Column(name = "`s_year_in_cons`")
    @ApiModelProperty(value = "上年度经费投入情况")
    private String sYearInCons;

    @Column(name = "`s_cx_result`")
    @ApiModelProperty(value = "上一年度创新成果项")
    private String sCxResult;

    @Column(name = "`s_cx_result_change`")
    @ApiModelProperty(value = "上一年度成果转化")
    private String sCxResultChange;

    @Column(name = "`s_cx_zl_apply_cons`")
    @ApiModelProperty(value = "上一年度专利申请情况")
    private String sCxZlApplyCons;

    @Column(name = "`s_rc_train`")
    @ApiModelProperty(value = "上一年度培训人才")
    private String sRcTrain;

    @Column(name = "`s_rc_skill_level`")
    @ApiModelProperty(value = "上一年度技能等级提升")
    private String sRcSkillLevel;

    @Column(name = "`s_jj_cs_fee`")
    @ApiModelProperty(value = "上一年度创收金额")
    private String sJjCsFee;

    @Column(name = "`s_jj_jy_fee`")
    @ApiModelProperty(value = "上一年度节约金额")
    private String sJjJyFee;

    @Column(name = "`s_shxy`")
    @ApiModelProperty(value = "上一年度社会效益")
    private String sShxy;

    @Column(name = "`pic`")
    @ApiModelProperty(value = "工作室图片")
    private String pic;

    @Column(name = "`is_delete`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "是否删除 默认否")
    private Integer isDelete;

    @Column(name = "`org_area`",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "地区组织机构区分  字典 zqx_org_area")
    private String orgArea;

    @Column(name = "`audit_status`",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "区审核状态 默认未审核  zqx_audit_status")
    private String auditStatus;

    @Column(name = "`is_show`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "是否小程序展示")
    private Integer isShow;

    @Column(name = "`sort`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @Column(name = "`user_id`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "填报用户")
    private Long userId;

    @Column(name = "`hot`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "热度")
    private Integer hot;

    @Column(name = "`is_edit`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "是否允许编辑默认否")
    private Integer isEdit;

    @Column(name = "delete_time")
    @ApiModelProperty(value = "假删除时间")
    private Timestamp deleteTime;

    public void copy(SciStudio source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
